<?xml version="1.0"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
  <!ENTITY dc "http://purl.org/dc/elements/1.1/">
  <!ENTITY dcterms "http://purl.org/dc/terms/">
  <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
  <!ENTITY a "http://xmlns.heustics.org/schema/myelin/0.1/">
  <!ENTITY m "http://xmlns.heustics.org/ontology/myelin/0.1/">
]>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:exslt="http://exslt.org/common"
  xmlns:s="http://xmlns.heustics.org/xslt/ext/strings/0.1/"
  xmlns:l="http://xmlns.heustics.org/schema/i18n/0.1/"
  xmlns:a="&a;"
  xmlns:o="&a;GraphDocument#"
  exclude-result-prefixes="xsl exslt s l a o"
>
  <xsl:variable name="o:l10n" select="a:get-l10n('&a;GraphDocument#view')"/>  
  <xsl:variable name="o:graph-l10n" select="$o:l10n/*[@name='graph']/*"/>
      
  <xsl:template match='a:grouping[@count and @role="graph-types"]' name="a:container">
    <xsl:param name="config" select="/*/a:config"/>
    <xsl:param name="account" select="/*/a:account"/>
    <div class='container model_resource_types'>            
      <div class="container_header">
        <div class="label">
          <span>
            <xsl:value-of select="s:substitute(
              $o:graph-l10n[@key='grouping-header'],
              'id',@node-id
            )"/>
          </span>
          <div class="spacer"/> 
        </div>
        <div class="spacer"/>
      </div>
      <div class='container_nodes'>
        <span>
          <xsl:value-of select="$o:graph-l10n[@key='primary-type-desc']"/>
        </span>
        <ul>            
          <xsl:for-each select="*">
            <li>     
              <xsl:call-template name="a:even-odd-class-attr"/>
              <xsl:apply-templates select="." mode="a:container-node">
                <xsl:with-param name="config" select="$config"/>
                <xsl:with-param name="account" select="$account"/>
              </xsl:apply-templates>  
              <div class="spacer"/> 
            </li>
          </xsl:for-each> 
        </ul>      
        <div class="spacer"/>       
      </div>  
      <!-- there will always be 1 or more nodes -->
      <!-- xsl:if test="@more">
        <div class="container_more">
          <a href='{$grouping-url}'>
            <xsl:value-of select="$o:container-l10n[@key='more']"/>
          </a>
          <div class="spacer"/>
        </div>    
      </xsl:if -->      
      <div class="spacer"/>
    </div>
  </xsl:template>
  
  <xsl:template match="a:node" mode="a:container-node" name="a:container-node">    
    <!-- xsl:param name="l10n" select="$o:container-l10n"/ --> 
    <!--xsl:param name="theme" select="$o:theme/l:context[@name='container-node']/*"/ -->
    <!-- xsl:variable name="edit" select="a:node-acls/a:acl[@action='edit']"/ -->
    <div class="actions-and-title">
            
      <div class='title'>
        <a href="{@uri}">
          <xsl:value-of select='@uri'/>
        </a>
        <div class='spacer'/>   
      </div>         
      <div class='spacer'/>
    </div>
    
  </xsl:template>   
      
</xsl:stylesheet>

